sso api to use samsung product api, <script type="text/javascript" src="$webapis/webapis/webapis js"></script> should be loaded in index html this module defines the sso functionalities provided by the tizen samsung product api since 2 3 product tv, bd privilege level partner privilege http //developer samsung com/privilege/sso partner summary of interfaces and methods interface method ssomanagerobject ssomanager void showaccountview domstring widgetname, ssocalldatasuccesscallback onsuccess, optional errorcallback? onerror ;domstring getversion ;domstring getloginuid ;ssologinstate getloginstatus ;void showcreateaccountview ssonumsuccesscallback onsuccess, optional errorcallback? onerror ; ssocalldatasuccesscallback void onsuccess ssocalldata data ; ssostringsuccesscallback void onsuccess domstring data ; ssonumsuccesscallback void onsuccess long data ; ssologinstate ssotermsagreementstate 1 type definitions 1 1 ssodata defines a dictionary for login data dictionary ssodata { boolean blogin; domstring id; domstring authtoken; domstring uid; domstring guid; }; the following values are supported blogin login status id login id authtoken login authentication token uid login uid guid login guid 2 interfaces 2 1 ssomanagerobject defines a webapi object instance of the tizen samsung product api the webapis sso object enables access to sso api functionality [nointerfaceobject] interface ssomanagerobject { readonly attribute ssomanager sso; }; webapi implements ssomanagerobject; attributes readonly ssomanager sso sso api namespace 2 2 ssomanager provides methods for sso functionalities [nointerfaceobject] interface ssomanager { void showaccountview domstring widgetname, ssocalldatasuccesscallback onsuccess, optional errorcallback? onerror ; domstring getversion ; domstring getloginuid ; ssologinstate getloginstatus ; void showcreateaccountview ssonumsuccesscallback onsuccess, optional errorcallback? onerror ; }; methods showaccountview shows the sso login or logout page, and returns the sso login or logout information void showaccountview domstring widgetname, ssocalldatasuccesscallback onsuccess, optional errorcallback? onerror ; privilege level partner privilege http //developer samsung com/privilege/sso partner parameters widgetname widget name onsuccess callback method to invoke when the account page is shown onerror [optional][nullable] callback method to invoke if an error has occurred it provides the status, error name, and error message securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type notsupportederror, if this feature is not supported with error type invalidvalueserror, if any input parameter contains an invalid value with error type unknownerror, for any other error since 2 3 code example var onsuccess = function result { console log 'success ' + json stringify result ; }; var onerror = function error { console log 'error ' + error ; }; webapis sso showaccountview "facebook", onsuccess, onerror ; getversion retrieves the plugin version number domstring getversion ; privilege level partner privilege http //developer samsung com/privilege/sso partner return value domstring domstring version exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type notsupportederror, if this feature is not supported with error type invalidvalueserror, if any input parameter contains an invalid value with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror, for any other error since 2 3 code example var result = webapis sso getversion ; getloginuid retrieves the uid the uid is considered personally-identifying information and must be handled according to the privacy regulations for each country it must not be used for any purpose other than as an input parameter for the samsung checkout api whenever the uid value is sent outside the device, a secure protocol, such as https, must be used domstring getloginuid ; privilege level partner privilege http //developer samsung com/privilege/sso partner return value domstring domstring uid exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type notsupportederror, if this feature is not supported with error type invalidvalueserror, if any input parameter contains an invalid value with error type invalidstateerror, if the user is not signed in with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror, for any other error since 2 3 code example var result = webapis sso getloginuid ; getloginstatus retrieves the sso login status ssologinstate getloginstatus ; privilege level partner privilege http //developer samsung com/privilege/sso partner return value ssologinstate ssologinstate login state exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type notsupportederror, if this feature is not supported with error type invalidvalueserror, if any input parameter contains an invalid value with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror, for any other error since 2 3 code example var result = webapis sso getloginstatus ; showcreateaccountview shows the sso account creation screen void showcreateaccountview ssonumsuccesscallback onsuccess, optional errorcallback? onerror ; privilege level partner privilege http //developer samsung com/privilege/sso partner parameters onsuccess callback method to invoke when the createaccountpage was closed user can get number data 0 onerror [optional][nullable] callback method to invoke if an error has occurred it provides the status, error name, and error message securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type notsupportederror, if this feature is not supported with error type invalidvalueserror, if any input parameter contains an invalid value with error type unknownerror, for any other error since 2 3 code example var onsuccess = function result { console log 'success ' + result ; }; var onerror = function error { console log 'error ' + error ; }; webapis sso showcreateaccountview onsuccess, onerror ; 2 3 ssocalldatasuccesscallback defines the login success callback [callback = functiononly, nointerfaceobject] interface ssocalldatasuccesscallback { void onsuccess ssocalldata data ; }; methods onsuccess callback method returning the login success data void onsuccess ssocalldata data ; privilege level partner privilege http //developer samsung com/privilege/sso partner parameters data status 2 4 ssostringsuccesscallback defines the success callback for string data [callback = functiononly, nointerfaceobject] interface ssostringsuccesscallback { void onsuccess domstring data ; }; methods onsuccess callback method returning string data void onsuccess domstring data ; privilege level partner privilege http //developer samsung com/privilege/sso partner parameters data status 2 5 ssonumsuccesscallback defines the success callback for number data [callback = functiononly, nointerfaceobject] interface ssonumsuccesscallback { void onsuccess long data ; }; methods onsuccess callback method returning number data void onsuccess long data ; privilege level partner privilege http //developer samsung com/privilege/sso partner parameters data status 2 6 ssologinstate defines constants for login status [nointerfaceobject] interface ssologinstate { const unsigned short sso_not_login = 0; const unsigned short sso_login = 1; }; constants sso_not_login not logged in sso_login logged in 2 7 ssotermsagreementstate defines constants for agreement status [nointerfaceobject] interface ssotermsagreementstate { const unsigned short sso_not_agree = 0; const unsigned short sso_agree = 1; }; constants sso_not_agree disagreed sso_agree agreed 3 full webidl module sso { dictionary ssodata { boolean blogin; domstring id; domstring authtoken; domstring uid; domstring guid; }; [nointerfaceobject] interface ssomanagerobject { readonly attribute ssomanager sso; }; webapi implements ssomanagerobject; [nointerfaceobject] interface ssomanager { void showaccountview domstring widgetname, ssocalldatasuccesscallback onsuccess, optional errorcallback? onerror ; domstring getversion ; domstring getloginuid ; ssologinstate getloginstatus ; void showcreateaccountview ssonumsuccesscallback onsuccess, optional errorcallback? onerror ; }; [callback = functiononly, nointerfaceobject] interface ssocalldatasuccesscallback { void onsuccess ssocalldata data ; }; [callback = functiononly, nointerfaceobject] interface ssostringsuccesscallback { void onsuccess domstring data ; }; [callback = functiononly, nointerfaceobject] interface ssonumsuccesscallback { void onsuccess long data ; }; [nointerfaceobject] interface ssologinstate { const unsigned short sso_not_login = 0; const unsigned short sso_login = 1; }; [nointerfaceobject] interface ssotermsagreementstate { const unsigned short sso_not_agree = 0; const unsigned short sso_agree = 1; }; };